//
//  MyTabBar.h
//  CustomTabbar
//
//  Created by simon on 10-9-14.
//  Copyright 2010 simonwang142232@gmail.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MyTabBarDelegate.h"
#import "SmartRoadShowAppDelegate.h"

@class MyTabBarItem;
@class MyTabBarController;

@interface MyTabBar : UIView {
	
	MyTabBarController* tabBarController;
	//id<MyTabBarDelegate>* delegate;
	NSArray* items;
	//MyTabBarItem* selectedItem;
	NSMutableArray* buttons;
	
	float leftMargin;
	float rightMargin;
	float topMargin;
	float bottomMargin;
	float itemSpacing;
	
	float imageRatio;
	UIFont* titleFont;
	
	//代理
	NSObject<MyTabBarDelegate>* delegate;
	SmartRoadShowAppDelegate *appDelegate;

}

@property(nonatomic) float leftMargin;
@property(nonatomic) float rightMargin;
@property(nonatomic) float topMargin;
@property(nonatomic) float bottomMargin;
@property(nonatomic) float itemSpacing;
@property(nonatomic) float imageRatio;
@property(nonatomic,retain) UIFont* titleFont;
@property(nonatomic,retain) MyTabBarController* tabBarController;
@property(nonatomic,retain) NSArray* items;

@property(nonatomic, retain) NSObject<MyTabBarDelegate>* delegate;

//所有按钮都置为未选中状态
-(void)setAllButtonUnselected;
//设置某个按钮为选中状态
-(void)setSelectedAtIndex:(int)index;

-(void) pressAction:(id)sender;

@end
